<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
        <!-- 开发环境版本，包含了有帮助的命令行警告 -->
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <!-- 模板内容 -->
    <div id="demo">
        <button v-on:click='c1'>{{message1}}</button>
        <button v-on:click.once='c2'>{{message2}}</button>
        <a href="http://www.baidu.com" target="_blank">这就是一个普通的连接</a>
        <a @click.prevent href="http://www.baiduc.com" target="_blank">取消默认的行为</a>
    </div>
    <!-- js -->
    <script>
        var demo = new Vue({
            el:"#demo",
            data:{
              message1:"hello",
              message2:"hello",
              counter:0
            },
            methods:{
                c1() {
                    this.message1 = this.message1+'vue!';
                },
                c2() {
                    this.message2 = this.message2+'vue!'
                }
            }
        })
    </script>
</body>
</html>